package com.queming.music.entity;

import com.queming.core.entity.File;
import com.queming.core.entity.TraceableBaseEntity;
import com.queming.music.enums.ArtistStatus;
import lombok.Data;

import javax.persistence.*;
import java.util.List;

/**
 * @author chencidiao
 * @date 2022/05/07 09:25
 **/
@Entity
@Data
public class Artist extends TraceableBaseEntity {
    private String  name;

    private String remark;

    @OneToOne
    private File photo;

    @ManyToMany
    @JoinTable(name = "artist_music",joinColumns = @JoinColumn(name = "artist_id",referencedColumnName = "id"),inverseJoinColumns = @JoinColumn(name = "music_id",referencedColumnName = "id"))
    private List<Music> musicList;

    @Enumerated(value = EnumType.STRING)
    private ArtistStatus status=ArtistStatus.DRAFT;

    //是否被推荐
    private Boolean recommended=false;

    //推荐因素
    private Integer recommendedFactor=0;
}
